const  koa = require("koa");
const  mysql = require("koa-mysql");

let db = mysql.createPool({//链接mysql数据库
    host:"localhost",
    user:"root",
    password:"1223456",
    database:"h1809A",
})

let server = new koa();

server.use(function *() {
    let data = yield db.query(`select * from user`)
})

server.listen(8888)